﻿using System.Web.Mvc;

namespace QunProject.Web.Controllers
{
    /// <summary>
    /// 首页
    /// </summary>
    public class HomeController : BaseController
    {
        /// <summary>
        /// 首页
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {

            return View();
        }
        /// <summary>
        /// 关于
        /// </summary>
        /// <returns></returns>
        public ActionResult About()
        {
            return View();
        }
        /// <summary>
        /// 图片选择
        /// </summary>
        /// <returns></returns>
        public ActionResult Cover()
        {
            return View();
        }
        /// <summary>
        /// 错误提示
        /// </summary>
        /// <returns></returns>
        public ActionResult Error()
        {
            return View();
        }


        /// <summary>
        /// 获取站点首页数据
        /// </summary>
        /// <returns></returns>
        public JsonResult GetHomeIndexResult()
        {
            var result = HttpPost("GetHomeIndexResult");
            return Json(result);
        }

        /// <summary>
        /// 获取推荐文章
        /// </summary>
        /// <param name="ClassifyId">知识分类ID</param>
        /// <returns></returns>
        public JsonResult GetHotArticleResult()
        {
            var result = HttpPost("GetHotArticleResult");
            return Json(result);
        }

        /// <summary>
        /// 获取技术讨论文章
        /// </summary>
        /// <param name="discussId">技术讨论ID</param>
        /// <returns></returns>
        public JsonResult GetHotDiscussResult()
        {
            var result = HttpPost("GetHotDiscussResult");
            return Json(result);
        }

        /// <summary>
        /// 获取所有知识分类
        /// </summary>
        /// <returns></returns>
        public JsonResult GetClassifyResult()
        {
            var result = HttpPost("GetClassifyResult");
            return Json(result);
        }

        /// <summary>
        /// 获取友情链接
        /// </summary>
        /// <returns></returns>
        public JsonResult GetFriendHrefResult()
        {
            var result = HttpPost("GetFriendHrefResult");
            return Json(result);
        }
    }
}